home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Memphis Amiga Group / MAG Disk (1990-06)(Memphis Amiga Group).zip / MAG Disk (1990-06)(Memphis Amiga Group).adf / Sound.doc < prev    next >
Text File  |  1990-04-11  |  9KB  |  186 lines

  1. *****************************  Sound.doc  ********************************
  2.  
  3.     Sound will attempt to feed <SOUNDfilename>'s data to the audio device.
  4. It will 'sound' files containing ANY kind of data, (try 'Sound Sound' :-)
  5. and of ANY length. If you have expansion memory, 'Sound' will store data
  6. in FAST ram, and use only 4-5 k. of CHIP ram to actually sound the data.
  7. This is the magic of 'double-buffering'. In addition, if you set the 'D'
  8. flag (for DIRECT_FROM_DISK), the sample will be played directly off the
  9. disk instead of first being loaded into FAST RAM. The advantage is that
  10. those with limited RAM can now hear those giant sized samples. The dis-
  11. advantage is that, depending on your disk speed, the sample size, stereo
  12. setting, samples/sec, how much multi-tasking is going on, and whether
  13. or not the sample is compressed, the sample may sound fragmented. This
  14. feature should be used to personal taste and necessity but will be
  15. automatically enabled if there is insufficient contiguous RAM available.
  16. When DIRECT_FROM_DISK is enabled, Sound will use most of the available
  17. CHIP RAM to help limit fragmenting. On the other hand, DIRECT_FROM_DISK
  18. allows a 800k soundfile (one full floppy) to be listened to using only an
  19. un-expanded Amiga 1000 (256k MAX)!
  20.  
  21.    If the STEREO flag is turned ON,the data will be split and played in
  22. stereo. Otherwise, identical data is sent to left and right channels
  23. unless limited by the LEFT or RIGHT flags. (You MUST use a L or R flag
  24. if you only want this sound to use only 1 Amiga audio channel).
  25.  
  26.    Perfect Sound (tm) samples in stereo will automatically sound in stereo.
  27. These are the only stereo samples I've seen, so I don't know if the code
  28. used is universal (in IFF) for STEREO.
  29.  
  30.    Thanks to a lucid description of Fibonacci compression by Wesley Howe,
  31. (thanks, Wes!), Sound can now handle compressed IFF files.
  32.  
  33.     If called from workbench, (by doubleclicking on a project icon), Sound
  34. will search the 'ToolTypes' entries in the project icon for STEREO,
  35. VOLUME, END_VOLUME, CHANNEL, CYCLES, SAMPLES_PER_SECOND, EFFECT, and
  36. DIRECT_FROM_DISK. If found, these values will override any IFF values
  37. read from the SOUNDfile.
  38.  
  39.     If called from CLI, over-riding values for STEREO, CHANNEL, CYCLES,
  40. VOLUME, END_VOLUME, SAMPLES_PER_SECOND, EFFECT, and/or DIRECT_FROM_DISK
  41. may be specified in the command line.  (see below)
  42.  
  43.     If no settings for STEREO, CYCLES, CHANNEL, SAMPLES_PER_SECOND, VOLUME,
  44. FADE, and/or DIRECT_FROM_DISK are found, in the file itself or in the
  45. calling arguments, STEREO defaults to OFF, CYCLES to 1, left and right both
  46. on, SAMPLES_PER_SECOND to 10000, EFFECTS to OFF, DIRECT_FROM_DISK to OFF. In
  47. the special case where there is not enough contiguous memory to load the
  48. entire sample, DIRECT_FROM_DISK will be automatically turned on.
  49.  
  50.     Note concerning DIRECT_FROM_DISK: Results of playing the sound directly
  51. from disk will vary widely depending on conditions including; disk type
  52. (floppy or hard) & speed, CHIP ram available, CPU load (how many other
  53. processes are running), compression On or OFF, etc. It should only be
  54.  
  55. --------------------------------------------------------------------------
  56.                         *****   ABORT!   *****
  57.  
  58.    !!! Sound may be aborted by typing <CTRL> 'c' from the keyboard. !!!
  59.  
  60.   If <CTRL> 'c' does NOT abort the sound, click on the Sound 'Status'
  61.       line, (the top line), then <CTRL> 'c' again. 
  62.  
  63. --------------------------------------------------------------------------
  64.                    ***********  USAGE  ************
  65.  
  66. NOTE!!!  'Sound' should be in your 'c' directory, (ie, 'copy Sound c:'),
  67.            before the following USAGEs will work!
  68.  
  69.         USAGE: (from CLI)
  70.  
  71. Sound <filename> [SAMPLES_PER_SECOND] [vVOLUME] [eEND_VOLUME] [CYCLES] [FLAGS]
  72.  
  73.     The filename MUST be the first argument, then the other arguments
  74. may be in any order, or missing. (see below for valid values). Sound
  75. alone will display a USAGE message. Sound will 'sound' the file, then
  76. display the SAMPLES_PER_SECOND (if the file was found) and STEREO if
  77. the sample was played in stereo. Use V (ie v48) to set volume to other
  78. than the default 64, or for effects using multiple cycles and E
  79. (end_volume). For example, 'SOUND WhosBad 6 v10 e64' will play the
  80. sample 6 times starting with the first at volume=10, and increasing
  81. with each cycle such that the last cycle is at volume=64. Fades can
  82. also be done within each cycle. See the fade and grow flags below.
  83.  
  84.         FLAGS:
  85.  
  86.    D or d = load the sample DIRECT_FROM_DISK (no FAST RAM buffer)
  87.    F or f = start volume from 64 and fade to 1 for each sample.
  88.    G or g = start volume from 1 and grow to 64 for each sample.
  89.    L or l = LEFT Channel only
  90.    R or r = RIGHT Channel only
  91.    S or s = toggles STEREO on/off <-- NOTE! changed from previous versions!
  92.    Q or q = disable the StatusLine that usually appears on the top line.
  93.    
  94. FLAGS should be separated by spaces: ie,  'Sound Sneeze 4 e20 l q'
  95.   will play 'sneeze' in the left channel four times, fading the volume
  96.   each cycle until the last cycle plays at volume=20. No status window
  97.   will be displayed. You may also use the full flag names if you wish for
  98.   any flag. So the above example could be: 'Sound Sneeze 4 E20 LEFT Quiet'
  99.  
  100.     Although maximum CYCLES = 65535, from CLI the maximum is 55.
  101.  
  102.  
  103.         USAGE: (from WorkBench)
  104.  
  105.    Double-'Click' on project icon whose Default Tool is set to 'c:Sound'.
  106.  
  107.      ToolTypes:   STEREO=      CYCLES=      SAMPLES_PER_SECOND=
  108.                   CHANNEL=     SOURCE=      DIRECT_FROM_DISK=
  109.                   VOLUME=      EFFECT=      END_VOLUME=
  110.  
  111.    Valid Values:  (these values stored in the .info file)
  112.  
  113.        CYCLES                 0 - 65535   0 = sound loops until aborted.
  114.                                            Use CONTROL-C to stop.
  115.        SAMPLES_PER_SECOND    56 - 65535   greater than 30000 seems to have
  116.                                            no effect, but MAX = 64k.
  117.        VOLUME                  1  - 64    How loud it starts. default=64
  118.        END_VOLUME              1  - 64    How loud the last cycle starts.
  119.        CHANNEL             RIGHT or LEFT  (r or l) Useful for effects.
  120.        EFFECT                FADE - GROW  Changes volume over single cycle
  121.                                            from 1-64 (GROW) or 64-1 (FADE).
  122.        STEREO                ON -   OFF   default=off. Not case sensitive.
  123.                                            File is split left/right.
  124.        DIRECT_FROM_DISK      ON  -  OFF   Don't load into RAM first.
  125.        SOURCE                 any text    Where did this sound come from?
  126.        AUTHOR                 any text    Immortality, if ya want it...
  127.        
  128. --------------------------------------------------------------------------
  129.                  ********  ARGUMENT PRIORITIES  *******
  130.  
  131.    Arguments from CLI or in the WorkBench Icon override any IFF info.
  132.  
  133.               IFF file info overrides the default values.
  134.  
  135.     Defaults: STEREO = off, CYCLES = 1, both CHANNELS, VOLUME = 64,
  136.                    SAMPLES_PER_SECOND = 10000,   FADE = OFF
  137.  
  138. --------------------------------------------------------------------------
  139.                     *********  REVISIONS  *********
  140.  
  141. MAY 1988  -  Initial release.
  142.  
  143. DEC 1988  -  Added multiple icon select, double buffering, QUIET flag.
  144.  
  145. DEC 1989  -  Now shows soundfile name in status bar.
  146.              No longer crashes if all 4 audio channels are already in use.
  147.  
  148. JAN 1990  -  No longer gives incorrect error warnings on 2500/30's.
  149.  
  150. FEB 1990  -  Handles standard IFF de-compression.
  151.              Changed some input formats to allow adding:
  152.                VOLUME, END_VOLUME, FADE, GROW, and DIRECT_FROM_DISK.
  153.              Automatically adjusts period for PAL/NTSC clock rate diff.
  154.              Re-compiled with Aztec 5.0a
  155.  
  156. APR 1990  -  Fixed bug. (DIRECT_FROM_DISK was broken for multiple cycles).
  157.  
  158. --------------------------------------------------------------------------
  159.     Sound is copyright 1988,90 by Richard Lee Stockton, 21305 60th Ave W.,
  160. Mountlake Terrace, Washington 98043, 206/776-1253(voice), but may be freely
  161. distributed as long as no profit is made from its distribution or sale
  162. without my written permission. I call this concept 'FreeWare', you can
  163. call it whatcha want.
  164.  
  165. NOTE: Sound has been compacted using PowerPacker 2.3b. (42% savings)
  166.  
  167.     I also released the source code, (Manx 5.0a), in the hope that it
  168. will be of benefit to someone in the Amiga programming community. Feel
  169. free to alter it at will, (but at your own risk!). I _would_ appreciate
  170. receiving a copy of whatever it may become, and it is always nice to be
  171. credited, (perhaps just a few lines of glowing tribute.^).
  172.  
  173.               Long Live Leo and All the Little Schwabie's!
  174.  
  175.      Included in this arc file are a sample project icon and its related
  176. data file (WhosBad.info and WhosBad) as well as Sound, & this file.
  177. WhosBad is a COMPRESSED STEREO sound sample made with Perfect Sound.
  178. Feel free to design your own icons, any project icon should work. Just
  179. make the Default Tool in the icon 'c:Sound'.
  180.  
  181.      Please try to keep all these files together when distributing as
  182.      every little bit may be of help!
  183.                                           Stay Warm & Enjoy!  - Richard
  184.  
  185. ***************************** Sound.doc **********************************
  186.